/** 
 * File-Name:ExceptionInfo.java
 *
 * Created on 2011-4-7 上午10:08:18
 * 
 * @author: Neo (neolimeng@gmail.com)
 * Software Engineering Institute, Peking University, China
 * 
 * Copyright (c) 2009, Peking University
 * 
 *
 */
package com.exceptionhandler.entity;

import java.util.List;
import java.util.UUID;

/**
 * Description:Model of an Exception
 * 
 * @author: Neo (neolimeng@gmail.com) Software Engineering Institute, Peking
 *          University, China
 * @version 1.0 2011-4-7 上午10:08:18
 */
public class ExceptionInfo extends CommonEntity {
	private String uuid = UUID.randomUUID().toString();

	private String fullName;
	private String tip;
	private String url;
	private List<StackInfo> stackTrace;
	private String stackTraceString;
	private String reserve01;
	private String reserve02;
	private String reserve03;
	private String reserve04;
	private String reserve05;

	public String getShortName() {
		if (null == fullName) {
			return null;
		} else {
			return new String(fullName.substring(fullName.lastIndexOf(".") + 1));
		}
	}

	public String getFullName() {
		return fullName;
	}

	public void setFullName(String fullName) {
		this.fullName = fullName;
	}

	public StackInfo getThrownSpot() {
		if (stackTrace == null || stackTrace.size() == 0) {
			return null;
		} else {
			return stackTrace.get(0);
		}
	}

	public List<StackInfo> getStackTrace() {
		return stackTrace;
	}

	public void setStackTrace(List<StackInfo> stackTrace) {
		this.stackTrace = stackTrace;
	}

	public String getStackTraceString() {
		return stackTraceString;
	}

	public void setStackTraceString(String stackTraceString) {
		this.stackTraceString = stackTraceString;
	}

	public String getUuid() {
		return uuid;
	}

	public void setUuid(String uuid) {
		this.uuid = uuid;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getReserve01() {
		return reserve01;
	}

	public void setReserve01(String reserve01) {
		this.reserve01 = reserve01;
	}

	public String getReserve02() {
		return reserve02;
	}

	public void setReserve02(String reserve02) {
		this.reserve02 = reserve02;
	}

	public String getReserve03() {
		return reserve03;
	}

	public void setReserve03(String reserve03) {
		this.reserve03 = reserve03;
	}

	public String getReserve04() {
		return reserve04;
	}

	public void setReserve04(String reserve04) {
		this.reserve04 = reserve04;
	}

	public String getReserve05() {
		return reserve05;
	}

	public void setReserve05(String reserve05) {
		this.reserve05 = reserve05;
	}

	public String getTip() {
		return tip;
	}

	public void setTip(String tip) {
		this.tip = tip;
	}
}
